//
//  SecondViewController.swift
//  autoTest
//
//  Created by 寒山 on 2019/1/22.
//  Copyright © 2019 江稳. All rights reserved.
//

import UIKit

class SecondViewController: UIViewController {

    @IBOutlet var pushButton: UIButton!
    
    @IBOutlet var butonSwitch: UISwitch!
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    
    @IBAction func switchAction(_ sender: Any) {
        self.pushButton.isEnabled = (sender as! UISwitch).isOn
    }
    @IBAction func pushAction(_ sender: Any) {
        let vc = UIViewController ()
        vc.title = "第二个界面"
        self.navigationController?.pushViewController(vc, animated: true)
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
